package com.yonyou.cyxdms.sysAuth.service.entity.notification;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 通知通告之车厂角色
 * </p>
 *
 * @author adu
 * @since 2019-10-14
 */
@TableName("tt_notification_oem_role")
public class NotificationOemRolePO extends DMSBasePO<NotificationOemRolePO> {

	private static final long serialVersionUID = 1L;

	/**
	 * 通知通告之车厂角色ID
	 */
	@TableId(value = "NOTIFICATION_OEM_ROLE_ID", type = IdType.AUTO)
	private Long notificationOemRoleId;

	/**
	 * 通知通告ID
	 */
	@TableField("NOTIFICATION_ID")
	private Long notificationId;

	/**
	 * APP_ID
	 */
	@TableField(value = "APP_ID")
	private String appId;

	/**
	 * 角色ID
	 */
	@TableField("ROLE_ID")
	private Long roleId;

	/**
	 * 角色名称
	 */
	@TableField("ROLE_NAME")
	private String roleName;

	/**
	 * 角色代码
	 */
	@TableField("ROLE_CODE")
	private String roleCode;

	/**
	 * 是否删除
	 */
	@TableField("IS_DELETED")
	@Version
	@TableLogic
	private Boolean isDeleted;


	public NotificationOemRolePO() {
		super();
	}


	public Long getNotificationOemRoleId() {
		return notificationOemRoleId;
	}

	public void setNotificationOemRoleId(Long notificationOemRoleId) {
		this.notificationOemRoleId = notificationOemRoleId;
	}

	public Long getNotificationId() {
		return notificationId;
	}

	public void setNotificationId(Long notificationId) {
		this.notificationId = notificationId;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public Boolean getDeleted() {
		return isDeleted;
	}

	public void setDeleted(Boolean isDeleted) {
		this.isDeleted = isDeleted;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	@Override
	protected Serializable pkVal() {
		return this.notificationOemRoleId;
	}

	@Override
	public String toString() {
		return "NotificationOemRolePO{" +
				"notificationOemRoleId=" + notificationOemRoleId +
				", notificationId=" + notificationId +
				", appId='" + appId + '\'' +
				", roleId=" + roleId +
				", roleName='" + roleName + '\'' +
				", roleCode='" + roleCode + '\'' +
				", isDeleted=" + isDeleted +
				'}';
	}

	/**
	 * 将PO 信息转化为DTO
	 *
	 * @param dto 需要进行转换的dto
	 * @author chengliang
	 * @since 2019-09-17
	 */
	protected <T extends BaseDTO> void transDtoToPo(T dto) {
		BeanMapperUtil.copyProperties(this, dto, "notificationOemRoleId");
	}


}
